<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理后台</title>
<link href="Css/css.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
<!--
function fnOnBack() {
	var url = '<?php echo url('BoDashboard', 'Welcome'); ?>';
	document.location.href = url;
}
// -->
</script>
<style type="text/css">
<!--
body {
	background-color: #ddeef2;
}
-->
</style>
</head>

<body>
<div id="main_title"><a href="#">后台管理中心</a>—规则编辑</div>
<div id="main_content">
  <form action="<?php echo $this->_url('save',array('catid' => $catid,'access' => $_REQUEST['access'])); ?>" method="post" enctype="multipart/form-data" name="form1" id="form1" onsubmit="return fnOnSubmit(this);">
	<table width="100%" border="0" cellspacing="2" cellpadding="2">
    	<tr>
		  <td class="title" width="40%">&nbsp;</td>
		  <td>&nbsp;</td>
	    </tr>
	<?php
	if($_GET['type']==101){
	?>
		<tr>
		  <td class="title">*学历</td>
	      <td>
		  <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>			  
		    <select name="foreign_key" size="1" id="foreign_key">
		    <option value="0">--请选择--</option>
				<?php
                if (isset($article['foreign_key'])) {
                    $selectedClasses = (array)$article['foreign_key'];
                } else {
                    $selectedClasses = array();
                }
                foreach ($education as $class){
                ?>
                <option value="<?php echo $class['class_id']; ?>"<?php if (in_array($class['class_id'], $selectedClasses)): ?>selected<?php endif; ?>><?=$class['name']?></option>
                <?php 
				}
                ?>
                </select>
              </td> 
            </tr>
          </table>
          </td>
	    </tr>
	<?php
	}elseif($_GET['type']==102){
	?>
    	<tr>
		  <td class="title">*职位</td>
	      <td>
		  <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>			  
		    <select name="foreign_key" size="1" id="foreign_key">
		    <option value="0">--请选择--</option>
				<?php
                if (isset($article['foreign_key'])) {
                    $selectedClasses = (array)$article['foreign_key'];
                } else {
                    $selectedClasses = array();
                }
                foreach ($positions as $class){
                ?>
                <option value="<?php echo $class['class_id']; ?>"<?php if (in_array($class['class_id'], $selectedClasses)): ?>selected<?php endif; ?>><?=$class['name']?></option>
                <?php 
				}
                ?>
                </select>
              </td> 
            </tr>
          </table>
          </td>
	    </tr>
	<?php
	}elseif($_GET['type']==999){
	?>
    	<tr>
		  <td class="title">*编号</td>
	      <td>
		  <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>			  
		    <select name="foreign_key" size="1" id="foreign_key">
		    <option value="0">--请选择--</option>
				<?php
                if (isset($article['foreign_key'])) {
                    $selectedClasses = (array)$article['foreign_key'];
                } else {
                    $selectedClasses = array();
                }
                foreach ($users as $class){
                ?>
                <option value="<?php echo $class['uid']; ?>"<?php if (in_array($class['uid'], $selectedClasses)): ?>selected<?php endif; ?>><?=$class['code']?></option>
                <?php 
				}
                ?>
                </select>
              </td> 
            </tr>
          </table>
          </td>
	    </tr>
    <?php
    }elseif($_GET['type']==104){
	?>
    	<tr>
		  <td class="title">*月份数</td>
		  <td><input type="text" name="month" id="month" value="<?php echo $article['month']; ?>"/></td>
	    </tr>
    <?php
	}
	if($_GET['type']!=103 && $_GET['type']!=999){
	?>
    	<tr>
		  <td class="title">*部门</td>
	      <td>
		  <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>			  
		    	<select name="department" size="1" id="department">
		    	<option value="0">--请选择--</option>
				<?php
                if (isset($article['department'])) {
                    $selectedClasses = (array)$article['department'];
                } else {
                    $selectedClasses = array();
                }
                foreach ($deptclasses as $class){
                ?>
                <option value="<?php echo $class['class_id']; ?>"<?php if (in_array($class['class_id'], $selectedClasses)): ?>selected<?php endif; ?>><?=$class['name']?></option>
                <?php 
				}
                ?>
                </select>
              </td> 
            </tr>
          </table>
          </td>
	    </tr>
	<?php
    }
	?>
    	<tr>
		  <td class="title">*工资</td>
		  <td><input type="text" name="money" id="money" value="<?php echo $article['money']; ?>"/></td>
	    </tr>
        <tr>
		  <td class="title">*描述</td>
		  <td><textarea name="des" cols="50" rows="4" id="des" type="text"/><?php echo $article['des']; ?></textarea></td>
	    </tr>
		<tr>
		  <td align="center" colspan="2">
              <button type="submit" name="Save" id="Save" class="btnA">发布</button>&nbsp;&nbsp;
              <input name="Cancel" type="button" id="Cancel" value="<?php echo h(_T('ui_g_cancel')); ?>" onclick="fnOnBack();" />
          </td>
	    </tr>
		<tr>
		  <td>&nbsp;</td>
		  <td></td>
		</tr>
	</table>
    <input name="type" type="hidden" id="type" value="<?=$_GET['type']?>"/>
	<input name="<?php echo $pk; ?>" type="hidden" id="<?php echo $pk; ?>" value="<?php echo $article[$pk]; ?>"/>
  </form>
</div>
<div id="main_copy">Copyright&copy;2003 – 2009 ITeam Monkey. All Rights Reserved ITeam Monkey 版权所有 </div>
</body>
</html>
